<!DOCTYPE html>
<html>
<head>
    <title>微信安全支付</title>
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <style type="text/css">
         body {padding: 0;margin: 0;background-color: #eeeeee;font-family: '����';}
        .pay-main {background-color: #4cb131;padding-top: 20px;padding-bottom: 20px;}
        
        .pay-main .lines {margin: 0 auto;text-align: center;color: #cae8c2;font-size: 12pt;margin-top: 200px;font-weight:bold;}
    </style>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.call('hideOptionMenu');
        });
    </script>
   
</head>
<body>
<script type="text/javascript">
    function jsApiCall(){
        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',
        <?php echo $jsApiParameters; ?>,
        function(res){
            if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                location.href = "<?php echo $tzurls?>";
            } else {
                if (res.err_msg == 'get_brand_wcpay_request:cancel') {
                    //history.go(-1);
                    //WeixinJSBridge.call('closeWindow');
                    location.href = "<?php echo $tzurl?>";
                }
                else{
                    //WeixinJSBridge.call('closeWindow');
                
                }
               
            }
        }
    );
    }
    function callpay(){
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }
    }
</script>
<script type="text/javascript">
   setTimeout("callpay()", 666 );
</script>

<div class="conainer" style="width:100%;height:1000px">
    
    <div class="pay-main" style="width:100%;height:100%" >

        <div class="lines" style="width:100%;height:100%;font-size: 30px">微信支付</div>
        
    </div>
  
    <div id="action" class="action" onclick="callpay();"></div>
</div>

</body>
</html>